<!DOCTYPE html>
<html lang="en">
<head>
    <#include "/common/header.ftl">
</head>
<body>
<div id="wrapper" class="toggled">
    <#include "/common/nav.ftl">
    <div class="page-content-wrapper">
        <div class="container-fluid">
            <#include "/common/search.ftl">
            <div class="col-md-12 column">
                <#--提交表单-->
                <form role="form" action="/productInfo/update" method="post">

                    <#--商品名称-->
                    <div class="form-group">
                        <label for="exampleInputEmail1">商品名称</label>
                        <input name="productName" value="${productInfo.productName}" type="text" class="form-control"/>
                    </div>

                    <#--单价-->
                    <div class="form-group">
                        <label for="exampleInputPassword1">单价</label>
                        <input  name="productPrice" value="${productInfo.productPrice}" type="number" class="form-control"/>
                    </div>


                    <#--库存-->
                    <div class="form-group">
                        <label for="exampleInputPassword1">库存</label>
                        <input  name="productStock" value="${productInfo.productStock}" type="number" class="form-control"/>
                    </div>


                    <#--描述-->
                    <div class="form-group">
                        <label for="exampleInputPassword1">描述</label>
                        <input  name="productDescription" value="${productInfo.productDescription}" type="text" class="form-control"/>
                    </div>

                    <#--小图-->
                    <div class="form-group">
                        <label for="exampleInputPassword1">小图</label>
                        <input  name="productIcon"  value="${productInfo.productIcon}" type="text" class="form-control"/>
                    </div>


                    <#--商品状态-->
                    <div class="form-group">
                        <label for="exampleInputPassword1">商品状态</label>
                        <input  name="productStatus" value="${productInfo.productStatus}" type="text" class="form-control"/>
                    </div>

                    <#--商品类型-->
                    <div class="form-group">
                        <label for="exampleInputPassword1">商品类型</label>
                        <select name="categoryType">
                            <#list productCategoryList as productCategory>
                                <#if productCategory.categoryType == categoryType && (productCategory.categoryType)??>
                                     <option selected="true" value ="${productCategory.categoryType}">${productCategory.categoryName}</option>
                                    <#else >
                                        <option value ="${productCategory.categoryType}">${productCategory.categoryName}</option>
                                </#if>
                            </#list>
                        </select>
                    </div>

                    <input name="productId" hidden value="${productInfo.productId}"/>
                    <input name="createtime" hidden value="${productInfo.createTime?string('yyyy-MM-dd HH:mm:ss')}">

                    <div class="checkbox">
                    </div> <button type="submit" class="btn btn-default">提交</button>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>